-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Update example app #172
Conversation
This reverts commit b7c4fd6.
example/android/app/build.gradle
Outdated
@@ -27,6 +27,7 @@ apply plugin: 'kotlin-android' | |||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | |||
|
|||
android { | |||
namespace 'com.example.amplitude_flutte_example' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: flutter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Update in 5c4ad59
@@ -50,7 +40,7 @@ class Amplitude extends _Amplitude { | |||
event.mergeEventOptions(options); | |||
} | |||
|
|||
return await _channel.invokeMethod("track", jsonEncode(event.toMap())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is jsonEncode not needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsonEncode()
is what our Flutter SDK used before. But one big problem with JSON string is that, in the Android plugin, getString()
casts null
to a string "null"
. invokeMethod()
accepts both String and Map data type. So I believe it's easier to get the value at client side and also to debug.
Other questions:
|
In case we need to release fix version for current Flutter SDK while developing the new Flutter SDK. Will merge v4.x into main with a breaking change.
Could you elaborate on it? How and where to show it? I didn't find anything related it min version in dev doc.
The pre-release version will not support web. |
Thanks @yuhao900914, I updated readme at 24780f7 |
🎉 This PR is included in version 4.0.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
2.12.0
to2.15.0
in order to support name property of EnumClick all button and can see requests being sent successfully.
Click to see paylaods!
Payload 1
``` { "api_key": "5b9a9510e261f9ead90865bbc5a7ad1d", "client_upload_time": "2024-02-28T21:00:08.325Z", "events": [ { "event_type": "Dart Click", "user_id": "Xinyi", "device_id": "Xinyi's pixel", "time": 1709153978106, "event_properties": {}, "user_properties": {}, "groups": {}, "group_properties": {}, "platform": "Android", "os_name": "android", "os_version": "12", "device_brand": "google", "device_manufacturer": "Google", "device_model": "sdk_gphone64_arm64", "carrier": "T-Mobile", "language": "en", "ip": "$remote", "version_name": "1.0", "event_id": 4, "session_id": 1709153875403, "insert_id": "d744e8fb-a73c-4581-85dd-a706b1f6c0f3", "library": "amplitude-analytics-android\/1.14.0" }, { "event_type": "$identify", "user_id": "Xinyi", "device_id": "Xinyi's pixel", "time": 1709154000792, "event_properties": {}, "user_properties": { "$set": { "identify_test": "identify sent at 1709154000791", "key": "value" }, "$add": { "identify_count": 1 } }, "groups": {}, "group_properties": {}, "platform": "Android", "os_name": "android", "os_version": "12", "device_brand": "google", "device_manufacturer": "Google", "device_model": "sdk_gphone64_arm64", "carrier": "T-Mobile", "language": "en", "ip": "$remote", "version_name": "1.0", "event_id": 5, "session_id": 1709153875403, "insert_id": "af1cb155-453b-4e6b-8ee0-8665e76837ee", "library": "amplitude-analytics-android\/1.14.0" }, { "event_type": "$identify", "user_id": "Xinyi", "device_id": "Xinyi's pixel", "time": 1709154004792, "event_properties": {}, "user_properties": { "$set": { "account": "acme" } }, "groups": { "account": "acme" }, "group_properties": {}, "platform": "Android", "os_name": "android", "os_version": "12", "device_brand": "google", "device_manufacturer": "Google", "device_model": "sdk_gphone64_arm64", "carrier": "T-Mobile", "language": "en", "ip": "$remote", "version_name": "1.0", "event_id": 6, "session_id": 1709153875403, "insert_id": "cf8e4d2e-efde-477a-8f9d-597b7a555ef6", "library": "amplitude-analytics-android\/1.14.0" } ] } ```Payload 2
``` { "api_key": "5b9a9510e261f9ead90865bbc5a7ad1d", "client_upload_time": "2024-02-28T21:00:19.784Z", "events": [ { "event_type": "$groupidentify", "user_id": "Xinyi", "device_id": "Xinyi's pixel", "time": 1709154015994, "event_properties": {}, "user_properties": {}, "groups": { "account": "acme" }, "group_properties": { "$set": { "group key": "group value" } }, "platform": "Android", "os_name": "android", "os_version": "12", "device_brand": "google", "device_manufacturer": "Google", "device_model": "sdk_gphone64_arm64", "carrier": "T-Mobile", "language": "en", "ip": "$remote", "version_name": "1.0", "event_id": 7, "session_id": 1709153875403, "insert_id": "bb783b51-38ee-4332-8d76-0b2fe869d6af", "library": "amplitude-analytics-android\/1.14.0" }, { "event_type": "revenue_amount", "user_id": "Xinyi", "device_id": "Xinyi's pixel", "time": 1709154017846, "event_properties": { "$productId": "specialProduct", "$quantity": 2, "$price": 41.23 }, "user_properties": {}, "groups": {}, "group_properties": {}, "platform": "Android", "os_name": "android", "os_version": "12", "device_brand": "google", "device_manufacturer": "Google", "device_model": "sdk_gphone64_arm64", "carrier": "T-Mobile", "language": "en", "ip": "$remote", "version_name": "1.0", "event_id": 8, "session_id": 1709153875403, "insert_id": "acd17c54-f017-4eaa-8bd3-b8ef24bf11cd", "library": "amplitude-analytics-android\/1.14.0" } ] } ```